"""caesar_blog URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
import os
from django.urls import path, include
from manager.views import manager, category,article

app_name = 'manager'
urlpatterns = [
    # 共用路由

    # 管理员视图路由
    path('login/', manager.login),
    path('verify/', manager.get_verify),
    path('index/', manager.index),
    path('logout/', manager.logout),
    path('member/', manager.member),
    path('member_add/', manager.member_add),
    path('member_change_state/', manager.member_change_state),
    path('member_del', manager.member_del),
    path('member_edit/',manager.member_edit),
    # 栏目视图路由
    path('category/',category.category),
    path('category_add/', category.category_add),
    path('category_edit/', category.category_edit),
    path('category_del/', category.category_del),
    # 文章视图路由
    path('article/',article.article),
    path('article_add/', article.article_add),
    path('article_edit/', article.article_edit),
    path('article_del/', article.article_del),
    # 文章中上传文件的路由
    path('fileupload/', article.fileupload),

]
